function res = dateax (id)

   ## usage: res = dateax (id)
   ## 
   ## transform date ids to datenums

   if columns(id) < 2
      id = [id ones(rows(id), 2)] ;
   endif
   if columns(id) < 3
      id = [id ones(rows(id), 1)] ;
   endif

   C = mat2cell(id, rows(id), ones(columns(id), 1)) ;

   res = datenum(C{:}) ;

endfunction
